#ifndef FILLEDTRIANGLE_H
#define FILLEDTRIANGLE_H

#include <QPainter>
#include <QList>
#include <qmath.h>
#include "Drawing.h"
#include "Line.h"
#include <algorithm>

using namespace std;

class FilledTriangle : public Drawing
{
    public:
        FilledTriangle();
        FilledTriangle(QList<QPoint*>vertexs);
        FilledTriangle(QList<QPoint*>vertexs, QList<QColor*>colors);

        void draw(QPainter*);
        void sortVertexs();
        void sortLines(QList<Line*> lines);

        void calcWidth();
        void calcHeight();
        float width();
        float height();
   private:
        float m_width;
        float m_height;
};

#endif // FILLEDTRIANGLE_H
